package com.ct.application.sysrmenus.service.impl;

import com.ct.application.sysrmenus.service.ISysRoleMenusService;
import com.ct.rbac.repository.ISysRoleMenusRespontory;
import org.springframework.stereotype.Service;

import jakarta.annotation.Resource;
/**
 * <p>
 * 角色菜单表 服务实现类
 * </p>
 *
 * @author Auto Generator
 * @since 2023-08-13
 */
@Service
public class SysRoleMenusServiceImpl implements ISysRoleMenusService {

    @Resource
    private ISysRoleMenusRespontory sysRoleMenusRespontory;

    /**
     * 判断菜单是否被角色引入
     * @param menuId
     * @return
     */
    @Override
    public Boolean countMenuRole(Long menuId){
        return sysRoleMenusRespontory.countMenuRole(menuId);
    }

    /**
     * 判断角色是否引入
     * @param roleId
     * @return
     */
    @Override
    public Boolean countRoleMenu(Long roleId){
        return sysRoleMenusRespontory.countRoleMenu(roleId);
    }

}
